import React, { Component } from 'react';
// import { Value } from 'sass';
// import logo from '../assets/logo192.png'
import {index_goodlist} from '../utils/api'
class MySecKill extends Component {
    state = {
        killlist: []
    }
    componentDidMount(){
            index_goodlist({page:1,count:6}).then((res)=>{
                this.setState({killlist:res.data.list})
            })
    }
    render() {
        return (
            <div className='myseckill'>
                <h2>今日值得买</h2>
                <div className='myseckilll'>
                {
                    this.state.killlist.map((item, index) => {
                        return (
                            <div className='kill' key={index}>
                                <img src={item.pic} alt="" />
                                <div className='killname'>{item.name}</div>
                                <div className='price'>抢购价￥{item.salesPrice.value}</div>
                            </div>
                        )

                    })
                }
                </div>
             
            </div>
        );
    }
}

export default MySecKill;